﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Pancliente
{
    public partial class Form1 : Form
    {
        AdminCliente _admin;

        public Form1(ConfiguracionCliente configuracion)
        {
            InitializeComponent();
            _admin = new AdminCliente(configuracion);
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            Visible = false;
            base.OnPaint(e);
        }

        private void tmrPija_Tick(object sender, EventArgs e)
        {
            tmrPija.Stop();

            try
            {
                _admin.BuscarComando();
            }
            catch (Exception ex)
            {
                _admin.GuardarErrores(ex);
            }

            tmrPija.Start();
        }
    }
}
